#!/usr/bin/env python
# -*- coding: utf-8 -*-

#作者: 赖勇浩
#日期: 2007-06-27

import sys

class Log(object):
	def __init__(self, *args):
		self.f = file(*args)
		sys.stdout = self
	def write(self, data):
		self.f.write(data)
		sys.__stdout__.write(data)

if __name__ == '__main__':
	#log = Log('C:\log.txt', 'w+')
	log = Log('/tmp/log.txt', 'w+')
	print 'hello, python!' 
	print 'I love python!'
